from flask import Flask, redirect,url_for
app = Flask(__name__)
@app.route('/index1')
def index1():
    # return redirect('https://www.baidu.com')
    return redirect(url_for('index2'))
@app.route('/index2')
def index2():
    return redirect('https://www.baidu.com')
@app.route('/')
def index3():
    return '<h1>Hello World!</h1>'
if __name__ == '__main__':
    app.run(debug=True)
